home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 42 / Amiga Format AFCD42 (Issue 126, Aug 1999).iso / -serious- / programming / amos / amoslist-0499 / amoslist / 000036_nobody_Sun Apr 4 05:01:27 1999.msg < prev    next >
Internet Message Format  |  1999-05-17  |  5KB

  1. Received: from onelist.com (pop.onelist.com [209.207.164.229])
  2.     by osf1.gmu.edu (8.8.8/8.8.8) with SMTP id FAA26270
  3.     for <mcox4@osf1.gmu.edu>; Sun, 4 Apr 1999 05:01:27 -0400 (EDT)
  4. Received: (qmail 29656 invoked by alias); 4 Apr 1999 09:09:19 -0000
  5. Received: (qmail 29645 invoked from network); 4 Apr 1999 09:09:18 -0000
  6. Received: from unknown (HELO mail.enterprise.net) (194.72.192.18) by pop.onelist.com with SMTP; 4 Apr 1999 09:09:18 -0000
  7. Received: from enterprise.net (andrewcrowe@max04-024.enterprise.net [194.72.196.144]) by mail.enterprise.net (8.8.5/8.8.5) with SMTP id KAA22418 for <amos-list@onelist.com>; Sun, 4 Apr 1999 10:01:21 +0100 (GMT/BST)
  8. From: Andrew Crowe <andrewcrowe@enterprise.net>
  9. To: amos-list@onelist.com
  10. Date: Sun, 04 Apr 1999 09:58:51 +0000
  11. Message-ID: <yam7763.2594.1198520664@mail.enterprise.net>
  12. In-Reply-To: <48f2f26f.243810a3@aol.com>
  13. X-Mailer: YAM 2.0Preview7 [020] - Amiga Mailer by Marcel Beck - http://www.yam.ch
  14. Mailing-List: list amos-list@onelist.com; contact amos-list-owner@onelist.com
  15. Delivered-To: mailing list amos-list@onelist.com
  16. Precedence: bulk
  17. List-Unsubscribe: <mailto:amos-list-unsubscribe@ONElist.com>
  18. Reply-to: amos-list@onelist.com
  19. Mime-Version: 1.0
  20. Content-type: multipart/mixed; boundary="BOUNDARY.1198520664.1"
  21. Subject: [amos-list] Re: RE : Screen Base
  22. Status: O
  23. X-Status: 
  24.  
  25. Warning: This is a message in MIME format. Your mail reader does not
  26. support MIME. Some parts of this message will be readable as plain text.
  27. To see the rest, you will need to upgrade your mail reader. Following are
  28. some URLs where you can find MIME-capable mail programs for common platforms:
  29.  
  30.   Amiga............: YAM          http://www.yam.ch/
  31.   Unix.............: Metamail     ftp://ftp.bellcore.com/nsb/
  32.   Windows/Macintosh: Eudora       http://www.qualcomm.com/
  33.  
  34. General info about MIME can be found at:
  35.  
  36. http://www.cis.ohio-state.edu/hypertext/faq/usenet/mail/mime-faq/top.html
  37.  
  38.  
  39. --BOUNDARY.1198520664.1
  40. Content-Type: text/plain
  41.  
  42. Hi Everybody,
  43.  
  44. > I dont know if anyone out there can help, but I cant seem to find any
  45. > examples on this command. Do any of you know how to use it etc ? Im trying
  46. > to find the address of each plane of a 32 colour screen. I know it returns
  47. > the address of the internal table, but after that im lost. Any help ?
  48.  
  49.    Heres an example of a C2P routine i wrote that writes directly to the
  50. screen memory.
  51.  
  52. See ya.
  53. -- 
  54.        Manta Soft  -  Amiga programing & web page designing
  55.    Http://members.tripod.com/~mantasoft/      ICQ: 21829166
  56.               Updated  27/3/99 -- New Bomberman clone started
  57.   - ------------------- Quote of the day: -------------------- -
  58. I have made this letter longer than usual because I lack the time to
  59. make it shorter.
  60. -- Blaise Pascal
  61.  
  62. --BOUNDARY.1198520664.1
  63. Content-Type: text/plain; name="C2P.asc"
  64. Content-Disposition: attachment; filename="C2P.asc"
  65.  
  66. NPLANE=5
  67. SX=320 : SY=200
  68.  
  69.  
  70. NCOL=2^NPLANE
  71. NPLANE=NPLANE-1
  72. Screen Open 0,SX,SY+10,NCOL,Lowres
  73. Flash Off 
  74.  
  75. Cls 0
  76.  
  77. Dim B(6)
  78.  
  79. Reserve As Work 5,SX*SY+10
  80.  
  81. S=Start(5)
  82.  
  83. Print "Creating chunky pattern in memory"
  84.  
  85. For X=0 To SX-1
  86.    For Y=0 To SY-1
  87.       Poke Start(5)+X+Y*SX,(X+Y mod NCOL)
  88.    Next 
  89. Next 
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96. Timer=0
  97. For X=0 To SX
  98.    For Y=0 To SY
  99.       P=Peek(Start(5)+X+Y*SX)
  100.       Plot X,Y,P
  101.    Next 
  102. Next 
  103. T1=Timer
  104.  
  105. Cls 0
  106.  
  107. Timer=0
  108. Gosub C2P
  109. T2=Timer
  110.  
  111. Cls 0
  112.  
  113.  
  114. Print "Plot :";T1
  115. Print "Direct write to memory:";T2
  116.  
  117.  
  118.  
  119. End 
  120.  
  121.  
  122. C2P:
  123.  
  124. BIT=0
  125. For A=0 To NPLANE
  126.    
  127.    B(A)=Phybase(A)
  128.    
  129. Next 
  130.  
  131. 'V=Varptr(BIT) 
  132. S=Start(5)
  133. TST=(SX*SY)-1
  134.  
  135. For A=S To S+TST Step 8
  136.    
  137.    P1=Peek(A)
  138.    P2=Peek(A+1)
  139.    P3=Peek(A+2)
  140.    P4=Peek(A+3)
  141.    P5=Peek(A+4)
  142.    P6=Peek(A+5)
  143.    P7=Peek(A+6)
  144.    P8=Peek(A+7)
  145.    
  146.    Z=A-S
  147.    
  148.    For PLN=0 To NPLANE
  149.       
  150.       BIT=0
  151.       
  152.       If Btst(PLN,P1)
  153.          BIT=BIT+128
  154.       End If 
  155.       
  156.       If Btst(PLN,P2)
  157.          BIT=BIT+64
  158.       End If 
  159.       
  160.       If Btst(PLN,P3)
  161.          BIT=BIT+32
  162.       End If 
  163.       
  164.       If Btst(PLN,P4)
  165.          BIT=BIT+16
  166.       End If 
  167.       
  168.       If Btst(PLN,P5)
  169.          BIT=BIT+8
  170.       End If 
  171.       
  172.       If Btst(PLN,P6)
  173.          BIT=BIT+4
  174.       End If 
  175.       
  176.       If Btst(PLN,P7)
  177.          BIT=BIT+2
  178.       End If 
  179.       
  180.       If Btst(PLN,P8)
  181.          BIT=BIT+1
  182.       End If 
  183.       
  184.       
  185.       Poke B(PLN)+Z/8,BIT
  186.       
  187.       'Print Bin$(BIT) 
  188.       
  189.    Next 
  190.    
  191.    
  192. Next 
  193.  
  194.  
  195. Return 
  196.  
  197. --BOUNDARY.1198520664.1--
  198.  
  199.